<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
<!--  &lt;!&ndash;  1.选择一个&ndash;&gt;-->
<!--  <select name="abc" v-model="fruit">-->
<!--    <option value="苹果">苹果</option>-->
<!--    <option value="香蕉">香蕉</option>-->
<!--    <option value="橘子">橘子</option>-->
<!--    <option value="橙子">橙子</option>-->
<!--    <option value="西瓜">西瓜</option>-->
<!--  </select>-->
<!--  {{fruit}}-->
<!--  &lt;!&ndash;  1.选择一个&ndash;&gt;-->
<!--  <select name="cc" v-model="fruits" multiple>-->
<!--    <option value="苹果">苹果</option>-->
<!--    <option value="香蕉">香蕉</option>-->
<!--    <option value="橘子">橘子</option>-->
<!--    <option value="橙子">橙子</option>-->
<!--    <option value="西瓜">西瓜</option>-->
<!--  </select>-->
<!--  {{fruits}}-->
<h2>----------------------</h2>
  <label v-for="item in fruits" :for="item">
  <input type="checkbox" :value="item" :id="item" v-model="fruitss">{{item}}
  </label>
  {{fruitss}}
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
<script>
  const app = new Vue({
    el: "#app",
    data: {
      fruit:'',
      fruits:['苹果','橘子','香蕉'],
      fruitss:[],


    }
  })
</script>
</body>
</html>
